<template>
  <input type="text" :value="value" @input="valueFn" />
</template>

<script lang="ts">
import { Vue, Component, Model, Watch, Emit } from "vue-property-decorator";

@Component
export default class child extends Vue {
  @Model("change", {
    type: String,
    default: "test111",
  })
  value!: string;

  @Emit("change")
  valueFn(e: any) {
    return e.target.value;
  }

  @Watch("value")
  onValue(v: string) {
    console.log("child", v);
  }
}
</script>

<style scoped></style>
